import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css';
import VueQuillEditor from 'vue-quill-editor'
import http from './apis/request.js'
import Cookies from "js-cookie";
import 'quill/dist/quill.core.css' // import styles
import 'quill/dist/quill.snow.css' // for snow theme
import 'quill/dist/quill.bubble.css' // for bubble theme
import moment from 'moment'

import VueCookies from 'vue-cookies'

Vue.prototype.$http = http;
// Vue.prototype.$download = download;
Vue.prototype.$cookies=Cookies
Vue.prototype.moment = moment
Vue.config.productionTip = false
Vue.use(ElementUI);
Vue.use(VueCookies)
Vue.use(VueQuillEditor, /* { default global options } */)


//定义一个全局过滤器实现日期格式化
Vue.filter('datrfmt', function (input, fmtstring) {//当input为时间戳时，需转为Number类型
  // 使用momentjs这个日期格式化类库实现日期的格式化功能
  return this.moment(input).format('YYYY-MM-DD HH:mm:ss');
})
let vue= new Vue({
  router,
  store,

  render: h => h(App)
}).$mount('#app')
export default vue